package com.xuelang.pipeline.worker.app.crd.tekton;


import com.xuelang.pipeline.worker.client.crd.dto.PipelineDTO;
import com.xuelang.pipeline.worker.client.crd.dto.PipelineRunDTO;
import com.xuelang.pipeline.worker.client.crd.tekton.v1beta.V1PipelineList;
import com.xuelang.pipeline.worker.client.crd.tekton.v1beta.V1PipelineRunList;
import com.xuelang.pipeline.worker.client.crd.tekton.v1beta.pipeline.V1Beta1Pipeline;
import com.xuelang.pipeline.worker.client.crd.tekton.v1beta.pipeline.V1Beta1PipelineRun;

/**
 * @author liuyuan.ly
 * @since 2024/5/30 15:12
 */
public interface TektonPipelineService {

    V1Beta1Pipeline saveOrUpdateTektonPipeline(PipelineDTO pipeline);

    V1PipelineList getTektonPipeline(PipelineDTO pipeline);

    V1Beta1PipelineRun createTektonPipelineRun(PipelineRunDTO pipeline);

    V1PipelineRunList getTektonPipelineRun(PipelineRunDTO pipeline);

    /**
     * 停止/取消 运行流水线
     * @param pipelineRunDTO
     * @return
     */
    Boolean cancelPipelineRun(PipelineRunDTO pipelineRunDTO);

}
